<!DOCTYPE html>
<html lang="zh-cn">
<head>
  <include file="Public:head"/>
</head>
<body>
<div class="panel admin-panel">
  <div class="panel-head" id="add"><strong><span class="icon-pencil-square-o"></span>其他设置</strong></div>
  <div class="body-content">
    <form method="post" class="form-x form" action="">
      <div class="form-group">
        <div class="label">
          <label>热门设置：</label>
        </div>
        <div class="field">
          <input type="text" class="input w50" value="{$row.like_num}" name="like_num" data-validate="required:请输入数量" />
          <div class="tipss">微信端点赞数量达到该值为热门贴</div>
        </div>
      </div>
      <div class="form-group">
        <div class="label">
          <label>分页设置：</label>
        </div>
        <div class="field">
          <input type="text" class="input w50" value="{$row.page_num}" name="page_num" data-validate="required:请输入数量" />
          <div class="tipss">微信端每次加载帖子数量</div>
        </div>
      </div>
      <div class="form-group">
        <div class="label">
          <label></label>
        </div>
        <div class="field">
          <input type="hidden" name="id" value="{$row.id}">
          <button class="button bg-main icon-check-square-o btn" type="button"> 提交</button>
        </div>
      </div>
    </form>
  </div>
</div>
<script type="text/javascript">
    $('.btn').click(function(e){
        e.preventDefault();
        $.post("{:U('set')}",$('.form').serialize(),function(msg){
            if(msg.status == 0){
                sweetAlert({title:'',text: msg.info,type: "warning",timer:2000,showConfirmButton: false});
            }
            if(msg.status == 1){
                sweetAlert({title:'',text: msg.info,type: "success",showConfirmButton: false});
                setTimeout(function(){window.location.reload()},1000);
            }
        });
    });
</script>
</body></html>